<template>
  <el-card class="app-container">
    <c-u-r-d-table :option="option"/>
  </el-card>
</template>

<script>

import ColumnType from '@/framework/constant/ColumnType'
import TimeTypeEnum from '@/feature/mj/infra/constants/TimeTypeEnum'
import {appointTimeSettingApi} from '@/feature/mj/infra/api/appointTimeSettingApi'
import CURDTable from '@/framework/components/table/CURDTable'
import TargetTypeEnum from "@/feature/mms/infra/constants/TargetTypeEnum";

export default {
  components: {CURDTable},
  data() {
    return {
      option: {
        requestApi: appointTimeSettingApi,
        showSelection: false,
        dialogWidth: '600px',
        columns: [
          {
            label: '时间类型',
            searchable: true,
            required: true,
            span: 24,
            prop: 'timeType',
            type: ColumnType.SELECT,
            options: TimeTypeEnum
          },
          {
            span: 24,
            required: true,
            label: '不可用日期',
            showFilter: ({value}) => value.timeType === TimeTypeEnum.SPECIFIC_DATE.id,
            type: ColumnType.DATE,
            prop: 'disabledDate'
          },
          // {
          //   span: 24,
          //   required: true,
          //   label: '开始时间',
          //   type: ColumnType.TIME,
          //   prop: 'timeSpanStart'
          // }, {
          //   span: 24,
          //   required: true,
          //   label: '结束时间',
          //   prop: 'timeSpanEnd',
          //   type: ColumnType.TIME
          // },
          {
            label: '创建时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtCreate'
          },
          {
            label: '修改时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtModified'
          }
        ]
      }
    }
  },
  methods: {}
}
</script>

